Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.19.4 displays #5601

Open
wants to merge 138 commits into
base: dev/feature
Choose a base branch
from
Open

1.19.4 displays #5601

wants to merge 138 commits into from

Conversation

TheLimeGlass
Copy link
Collaborator

@TheLimeGlass TheLimeGlass commented Apr 12, 2023

Description

  • Adds 1.19.4 displays support
  • Adds entity hiding because Spigot was finally forced to with these Displays.
  • Changes ColorRGB to be using static methods to create a new instance to keep in line with SkriptColor, there was an abandoned pull request to do this aswell.

Download

Many people rely on this pull request. If you also wish to use this experimental version, go to the "checks" tab and then click Java 17, it'll have a skript-nightly.zip containing the built jar of this pull request.

Documentation at https://docs.skriptlang.org/nightly/feature/displays/docs.html

Ender chest loot box opening where it spins around and dumps out the contents as the reward (Requires Biosphere2)

Video of animation in #showcase https://discord.com/channels/135877399391764480/1072217309852213298/1111482138924163082

on right click on ender chest:
	cancel event
	set {_before} to block data of event-block
	set event-block to air
	spawn block display of ender chest at event-block:
		set transformation translation of display to vector from 0.5, -0.5, -0.5
		set right transformation rotation of display to right transformation rotation of display rotated around the y-axis by -1.57
		set {_display} to event-entity
	set {_mod} to 0.04
	add a diamond, gold ingot, emerald, stone, bedrock, diamond sword, wooden hoe, any ore, any weapon, any armour and any wood to {_items::*}
	play sound "BLOCK_CHEST_OPEN" at event-block
	loop line from event-block to location 1.6 blocks above event-block with density 10:
		teleport {_display} to loop-value
		wait a tick
	loop circle at location 1.6 blocks above event-block with radius 2 and density 4.5:
		add loop-value to {_locations::*}
		teleport {_display} to loop-value
		set {_quaternion} to left transformation rotation of {_display}
		set {_quaternion} to {_quaternion} rotated around the z-axis by {_mod}
		set {_quaternion} to {_quaternion} rotated around the x-axis by {_mod}
		add {_quaternion} to {_quaternions::*}
		set left transformation rotation of {_display} to {_quaternion}
		add 1 to {_count}
		if {_count} is greater than 20:
			{_count} is less than 100
			drop a random item out of {_items::*} at location 1.5 blocks below loop-value without velocity
			play sound "ENTITY_EXPERIENCE_ORB_PICKUP" with volume 0.5 at loop-value
		wait a tick
	set {_mod} to 0.1
	set {_index} to size of {_locations::*}
	loop {_locations::*}:
		teleport {_display} to loop-value
		subtract 1 from {_index}
		set left transformation rotation of {_display} to {_quaternions::%{_index}%}
		wait a tick
	loop line from location 1.6 blocks above event-block to event-block with density 10:
		teleport {_display} to loop-value
		wait a tick
	play sound "BLOCK_CHEST_CLOSE" at event-block
	clear all entities
	set event-block to {_before}

Target Minecraft Versions: 1.19.4
Requirements: none, but paper for some.
Related Issues: none

@TheLimeGlass TheLimeGlass added the feature Pull request adding a new feature. label Apr 12, 2023
@TheLimeGlass TheLimeGlass marked this pull request as draft April 12, 2023 22:46
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mainly just went through the docs part this time.

Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a slightly more clear version of this sentence, and the axisangle thing you already acknowledged, and I'm satisfied.
nice work!

Copy link
Member

@cheeezburga cheeezburga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing code-related, just some very small nitpicky things with descriptions and stuff

# Conflicts:
#	build.gradle
#	src/main/java/ch/njol/skript/Skript.java
#	src/main/java/ch/njol/skript/classes/data/DefaultFunctions.java
#	src/main/java/ch/njol/skript/classes/data/JavaClasses.java
#	src/main/java/ch/njol/skript/classes/data/SkriptClasses.java
#	src/main/java/ch/njol/skript/effects/EffVectorRotateAroundAnother.java
#	src/main/java/ch/njol/skript/effects/EffVectorRotateXYZ.java
#	src/main/java/ch/njol/skript/expressions/ExprBlockData.java
#	src/main/java/ch/njol/skript/expressions/ExprColorOf.java
#	src/main/java/ch/njol/skript/expressions/ExprItemFrameSlot.java
#	src/main/java/ch/njol/skript/expressions/ExprVectorXYZ.java
#	src/main/java/ch/njol/skript/registrations/DefaultClasses.java
#	src/main/java/ch/njol/skript/util/ColorRGB.java
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Here's what I found this time around.

Also, it might be good to have more javadocs (at least at the class level) for the Rotator implementations.

Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Truly excellent work. Just a few things, and then this should be ready to ship

@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants